package com.ruoyi.extdata.service;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.bizsys.domain.CustomerInfo;
import com.ruoyi.extdata.common.ExtReqEnum;
import com.ruoyi.extdata.domain.OkRequestVo;

import java.math.BigDecimal;

/**
 * @Author: Jamnsin
 * @Date: 2021/1/13 3:53 下午
 */
public interface IExternalApiService {

    JSONObject invokePayStackApi(String apiName, String apiUrl, String reqMethod, JSONObject reqData,String userId);

    //地址返解码接口
    JSONObject getGeocode(String latitude, String longitude);//维度经度

    void dealTransferData(String eventType, String eventSource, String custNo, JSONObject data);

    void dealTransferData(String eventType, String eventSource, JSONObject data);

    //调用Monnify网站的Authentication接口
    String monnifyAuthLogin();

    //USSD-初始化Monnify订单
    String monnifyTransactionsInitTransaction(String custNo, BigDecimal subtract, String orderSn, String desc, String[] methods);

    //USSD-使用ussd方式支付Monnify订单
    String monnifyBankTransferInitPayment(String userId, String transactionReference, String accountDetailsBankCode);

    //USSD-查询Monnify订单状态
    JSONObject monnifyGetTransactionStatus(String transactionReference);

    //TransferToUs-生成预留账户
    JSONObject monnifyBankTransferReservedAccounts(String accountName, String bvn, String custEmail, String custName, String custNo);

    JSONObject callMonnifyService(JSONObject paramJson, String reqUrl, String apiName,boolean isPost);

    //TransferToUs-查询预留账户
    JSONObject monnifyGetBankTransferReservedAccounts(String custNo);

    //TransferToUs-查询预留账户的全部订单
    JSONObject monnifyGetAllTransactionsOnReservedAccount(String accountReference, Integer page, Integer size);

    String ruleRequest(JSONObject riskParam, String url, String apiName);

    /**
     * 外部请求
     * @param okRequestVo
     * @return
     */
    JSONObject crsRequest(OkRequestVo okRequestVo);

    JSONObject delPaystackForVa(String apiName, String apiUrl,String type, JSONObject reqParam, String custNo);

    JSONObject delPaystackForVaRetry(String apiName, String apiUrl,String type, JSONObject reqParam);

    JSONObject dealPaystackForCardWithhold(String apiName, String apiUrl, String type, JSONObject params);
}
